package com.leyou.common.exceptions;

import lombok.Getter;

//普通异常不能封装状态码，所以要自定义异常处理器，继承RuntimeException
@Getter
public class LyException extends RuntimeException{

    private final int status;

    public LyException(int status, String message) {
        super(message);
        this.status = status;
    }

    public LyException(int status, String message, Throwable cause) {
        super(message, cause);
        this.status = status;
    }

    public LyException(int status, Throwable cause) {
        super(cause);
        this.status = status;
    }
}